package com.buba.controller;


import com.buba.service.ItemLabelService;
import common.Result;
import entity.ItemLabelEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import result.CommonResult;

import java.util.List;
import java.util.Map;

/**
 * @author 高闯
 * @description TODO
 * @date 2023/2/20 8:54
 */
@RestController
@RequestMapping("category")
public class ItemLabelController {

    @Autowired
    ItemLabelService itemLabelService;

    /**
     * 查询树状图数据
     * @return
     */
    @GetMapping("/lists")
    public Result lists (){
        List<ItemLabelEntity> list= itemLabelService.tree(); //树状图数据
        return Result.success(list);
    }
}
















